package com.zwps.biz.controller.http;

import com.zwps.biz.domain.service.FloodWeatherScrapService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 预报气象数据获取
 */

@Controller
@RequestMapping("floodWeather")
@RestController
@Tag(name = "预报气象数据获取")
public class FloodWeatherScrapController {

    @Autowired
    FloodWeatherScrapService floodWeatherScrapService;

    @GetMapping("/scrap")
    @Scheduled(cron = "0 0 * * * ?")
    public void floodWeatherScrap() {
        floodWeatherScrapService.floodWeatherScrap();
    }
}
